﻿@{
    ViewBag.Title = "个人异常考勤详情";
}
@section headerSection{
    <style>
        #exampleToolbar > .form-group {
            float: left;
            margin: 0;
            margin-left: 5px;
        }
    </style>
}
<div class="animated fadeInRight">
    <!-- Panel Other -->
    <div class="ibox float-e-margins" style="margin-bottom: 0px;">
        <div class="ibox-content" style="padding: 5px 20px 0px 20px;">
            <div class="row row-lg">
                <div class="col-sm-12 col-sm-leftRight">
                    <!-- Example Toolbar -->
                    <div class="example">
                        <table id="exampleTableToolbar" data-mobile-responsive="true" data-radio="true"></table>
                    </div>
                    <!-- End Example Toolbar -->
                </div>
            </div>
        </div>
    </div>
    <!-- End Panel Other -->
</div>
@section footSection{
    <script>
        $(function () {
            recordDetialManager.initPage();
        });
        var $table, options;
        var hos_id, user_id, dateStart, dateEnd;
        var recordDetialManager = {
            //初始化页面
            initPage: function () {
                parent.showLoadBoxs();
                recordDetialManager.initData();
                recordDetialManager.initTable();
                recordDetialManager.bindEvent();
                parent.delLoadBoxs();
            },
            //初始化参数
            initData:function(){
                hos_id = $.getUrls("hos_id");
                user_id = $.getUrls("user_id");
                dateStart = $.getUrls("dateStart");
                dateEnd = $.getUrls("dateEnd");
            },
            //初始化Table
            initTable: function () {
                options = {
                    url: ctx + "/BaneHospital/GetBaneBugRecordDetialData",
                    cutHeight: 5,
                    showRefresh: 0,
                    showToggle: 0,
                    showColumns: 0,
                    toolbar: "#exampleToolbar",
                    queryParams: function (params) {
                        params = {
                            rows: params.limit,
                            //页面大小
                            page: params.offset / params.limit + 1,
                            orgId: hos_id,//医院ID
                            hos_id:hos_id,
                            user_id: user_id,
                            start_date: dateStart,
                            end_date: dateEnd
                        }
                        return params;
                    },
                    columns: [
                    {
                        field: '',//第一列序号
                        title: '序号',
                        align: 'center',
                        width: 50,
                        formatter: function (value, row, index) {
                            return index + 1;
                        }
                    },
                    {
                        field: 'user_name',
                        title: '人员姓名',
                        align: 'center'
                    },
                    {
                        field: 'user_identify',
                        title: '身份证',
                        align: 'center'
                    },
                    {
                        field: 'hos_name',
                        title: '考勤医院',
                        align: 'center'
                    }, {
                        field: 'per_day',
                        title: '考勤周期',
                        align: 'center',
                        formatter: function (value, row, index) {
                            if (value)
                                return value.toString() + " 天";
                            return "1 天";
                        }
                    }, {
                        field: 'ck_date',
                        title: '应考勤日期',
                        align: 'center',
                        formatter: function (value, row, index) {
                            return "<span style='color:red'>"+value+"</span>";
                        }
                    }]
                }
                $table = tableHelper.initTable("exampleTableToolbar", options);
            }
        }
    </script>
}

